const express = require('express')
const router = express.Router()

// 导入用户数据校验的中间件
const expressJoi = require('@escook/express-joi')
const { regRegusterEmail } = require('../check/user')

const router_info = require('../router_method/userInfo')
const router_method = require('../router_method/userRegister')
const router_bill = require('../router_method/userBalance')
const router_query = require('../router_method/uerBillQuery')

router.post('/userInfoQuery',router_info.userInfoQuery)
router.post('/userChangeInfo',router_info.userChangeInfo)
router.post('/updataPassword',router_info.updataPassword)
router.post('/updateUserPic',router_info.updateUserPic)
router.post('/updataPlateNumber',router_info.updataPlateNumber)
router.post('/updataEmail',router_info.updataEmail)
router.post('/userPlate',router_info.userPlate)
router.post('/userPlateBalance',router_info.userPlateBalance)
// 邮箱验证复用
router.post('/userChangeEmail',expressJoi(regRegusterEmail),router_method.userEmailCheck)
router.post('/userEmailSendAgain',expressJoi(regRegusterEmail),router_method.sendAgain)
router.post('/userEmailCodeCheck',router_method.userCodeCheck)

// 用户账单操作
router.post('/bigWallet',router_bill.bigWallet)
router.post('/smallWallet',router_bill.smallWallet)

// 用户账单查询
router.post('/queryByTime',router_query.queryByTime)
router.post('/queryByDefault',router_query.queryByDefault)
router.post('/queryByType',router_query.queryByType)
router.post('/queryByPlate',router_query.queryByPlate)

module.exports = router
















module.exports = router